{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DataSet(data, time, items)\n",
       "Number of items: 4\n",
       "Shape: (9, 884)\n",
       "1985-08-06 07:00:00 - 1985-08-07 03:00:00"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from mikeio import Dfsu\n",
    "\n",
    "filename = \"../tests/testdata/HD2D.dfsu\"\n",
    "dfs = Dfsu()\n",
    "\n",
    "ds = dfs.read(filename)\n",
    "\n",
    "ds"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Find which element is closest to POI."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "idx = dfs.find_closest_element_index(606200, 6905480)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Extract a subset of the dataset from this element. (Discrete values, no interpolation)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DataSet(data, time, items)\n",
       "Number of items: 4\n",
       "Shape: (9,)\n",
       "1985-08-06 07:00:00 - 1985-08-07 03:00:00"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "selds = ds.isel(idx=idx)\n",
    "selds"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Convert to a dataframe, for convenience."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Surface elevation</th>\n",
       "      <th>U velocity</th>\n",
       "      <th>V velocity</th>\n",
       "      <th>Current speed</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1985-08-06 07:00:00</th>\n",
       "      <td>0.459460</td>\n",
       "      <td>0.006372</td>\n",
       "      <td>-0.007143</td>\n",
       "      <td>0.009572</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985-08-06 09:30:00</th>\n",
       "      <td>0.806965</td>\n",
       "      <td>0.010517</td>\n",
       "      <td>0.003438</td>\n",
       "      <td>0.011064</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985-08-06 12:00:00</th>\n",
       "      <td>0.100285</td>\n",
       "      <td>0.011300</td>\n",
       "      <td>0.012926</td>\n",
       "      <td>0.017169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985-08-06 14:30:00</th>\n",
       "      <td>-0.727009</td>\n",
       "      <td>0.010402</td>\n",
       "      <td>0.010033</td>\n",
       "      <td>0.014452</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985-08-06 17:00:00</th>\n",
       "      <td>-0.579541</td>\n",
       "      <td>0.007293</td>\n",
       "      <td>-0.000902</td>\n",
       "      <td>0.007349</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     Surface elevation  U velocity  V velocity  Current speed\n",
       "1985-08-06 07:00:00           0.459460    0.006372   -0.007143       0.009572\n",
       "1985-08-06 09:30:00           0.806965    0.010517    0.003438       0.011064\n",
       "1985-08-06 12:00:00           0.100285    0.011300    0.012926       0.017169\n",
       "1985-08-06 14:30:00          -0.727009    0.010402    0.010033       0.014452\n",
       "1985-08-06 17:00:00          -0.579541    0.007293   -0.000902       0.007349"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = selds.to_dataframe()\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x283cd1c4588>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ0AAAEECAYAAADztukpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nOzdd3hUVfrA8e+bRk2hRAgQpCMlhIRQlSYK2CguCIiAiosKWHddcX9rWd1iWRWliBQBQQTEhiggTaUGAoQSakIxIZRAIKGlzvn9cQYMIQWSSe5M5nyeJ08yd8498w6avHPuPee8opTCMAzDMEqDh9UBGIZhGO7DJB3DMAyj1JikYxiGYZQak3QMwzCMUmOSjmEYhlFqTNIxDMMwSo2X1QGUhurVq6t69epZHYZhGIZL2bp162mlVKAj+3SLpFOvXj2ioqKsDsMwDMOliMhRR/dpLq8ZhmEYpcYkHcMwDKPUmKRjGIZhlBqTdAzDMIxSY5KOYRiGUWpM0jEMwzBKjUk6xs3JzgKbzeooDMNwUSbpGDdnwSMwPgTi1lgdiWG4psw0OLHb6igs45CkIyK9RWS/iMSKyLg8ni8nIgvsz0eKSD378WoiskZELojIxBztK4rIjyKyT0RiROTtHM89KiJJIhJt/3rCEe/BuAHHd8KBpZB2Dub0gx//ChkXrY7KMFzL4mdgyu2wdBxkZVgdTakrdtIREU9gEnAP0BwYIiLNczUbCZxVSjUCPgTesR9PA14F/ppH1/9TSt0GhAG3i8g9OZ5boJRqbf+aXtz3YNygjZPAuxI8sxU6jIYt0+CT2+H3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fZsmXccccdebZt164dzz33HPfffz+enp74+flRv359vvrqK0Ankh07dlxznr+/P1WqVGHt2rUAzJkzh65du+Ln50edOnX47rvvAD1CunTp0jXn+vr6cv78+WuOPfHEEzzyyCM89NBDeHpaeP9aKVXmv9q0aaOuczpWqdf9lPrl3eufMwzDqe3Zs8fqEFRMTIzq1q2bCg0NVaGhoWru3Ln5tv3qq68UoH755Zerxw4dOqR69eqlWrVqpZo1a6b++c9/KqWUev3119V7772nlFJq+/btqn379iokJET17dtXJScnK6WUOnDggOrevbsKCQlR4eHhKi4uTh0+fFi1aNFCKaXUmTNnVEREhAoNDVXz589XSimVkZGhfH191d69e/OMMa9/UyBKOfjvsagiDNVcTUREhIqKirr24IrXYMNEeCEG/IKsCcwwjCLZu3cvzZo1szoMlxIVFcULL7xwdeSUW17/piKyVSkV4cg43HOTsawM2P4FNL3HJBzDMMq8t99+m08++cTSezlXuOfea/t+gEunzQQCwzDcwrhx4zh69Gie95xKm3smnaiZukhbwzutjsQwDMOtuF/SOR0LR9ZC+AjwcL+3bxiGYSX3+6u7bRZ4eEGYNh2q5wAADidJREFUKWFgGIZR2twr6WSlQ/Q8PYHAt4bV0RiGYbgd90o6e3+AS2fMBALDMIqlW7duLF++/Jpj48ePZ/To0cXuu3LlykU677XXXmPlypVXY8m9YNRZuFfSiZoJVepBg+5WR2IYhgsbMmQI8+fPv+bY/PnzGTJkiEURwZtvvsldd+mtMk3ScQZJB+DoOjOBwDCMYhswYABLliy5uknnkSNHSExMvG5K8ssvv8zkyZOvPn7jjTd4//33AXjvvfdo27YtrVq14vXXX7/uNZRSvPTSS7Rs2ZKQkBAWLFhw9bl3332XkJAQQkNDGTdO18589NFHWbRoER9//DGJiYl0796d7t27M2PGDF544YWr506bNo0XX3zRcf8YN8l9Fodum22fQGBKGBhGmbJ0HJzY5dg+a4bAPW/n+3S1atVo164dy5Yto2/fvsyfP59BgwZdt8v04MGDef75569edlu4cCHLli3j559/5uDBg2zevBmlFH369OG3336jS5cuV8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4zh5w5WO4ziOkzf+D8S1aUNA0SKQAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df[[\"U velocity\",\"V velocity\"]].plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Create a new dfsu file\n",
    "\n",
    "* Subset of items\n",
    "* Subset of timesteps\n",
    "* Renamed variables\n",
    "\n",
    "First inspect the source file:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DataSet(data, time, items)\n",
       "Number of items: 4\n",
       "Shape: (9, 884)\n",
       "1985-08-06 07:00:00 - 1985-08-07 03:00:00"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ds"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Surface elevation <Surface Elevation> (meter),\n",
       " U velocity <u velocity component> (meter per sec),\n",
       " V velocity <v velocity component> (meter per sec),\n",
       " Current speed <Current Speed> (meter per sec)]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ds.items"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "from mikeio.eum import ItemInfo, EUMType\n",
    "\n",
    "sourcefilename = filename\n",
    "outfilename = \"HD2D_selected.dfsu\"\n",
    "\n",
    "data = []\n",
    "\n",
    "starttimestep = 4\n",
    "\n",
    "data.append(ds['U velocity'][starttimestep:,:])\n",
    "data.append(ds['V velocity'][starttimestep:,:])\n",
    "\n",
    "time = ds.time[starttimestep:]\n",
    "\n",
    "items = [ItemInfo(\"eastward_sea_water_velocity\", EUMType.u_velocity_component),\n",
    "         ItemInfo(\"northward_sea_water_velocity\",EUMType.v_velocity_component)]\n",
    "\n",
    "dt = (time[1] - time[0]).total_seconds()\n",
    "\n",
    "dfs.create(sourcefilename, outfilename, data, items=items, start_time=time[0], dt=dt)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Read the newly created file to verify the contents."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DataSet(data, time, items)\n",
       "Number of items: 2\n",
       "Shape: (5, 884)\n",
       "1985-08-06 17:00:00 - 1985-08-07 03:00:00"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "newds = dfs.read(outfilename)\n",
    "newds"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[eastward_sea_water_velocity <u velocity component> (meter per sec),\n",
       " northward_sea_water_velocity <v velocity component> (meter per sec)]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "newds.items"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Clean up"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.remove(outfilename)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
